package com.zheng.study.company.entity;

import com.zheng.study.base.entity.NameEntity;

import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * newFile
 * ============================================================================
 * author : dzw
 * createDate:  2018/8/16 。
 * ============================================================================
 */
@MappedSuperclass
public class CompanyEntity extends NameEntity {
	private static final long serialVersionUID = -5508101942527922598L;

	/**
	 * 创建人
	 */
	protected User creater;

	/**
	 * 所属企业
	 */
	protected Company company;

	@ManyToOne(fetch = FetchType.LAZY)
	public User getCreater() {
		return creater;
	}

	public void setCreater(User creater) {
		this.creater = creater;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}
}
